<template>
    <yd-navbar bgcolor="#00B2EE" height="0.9rem">
        <div @click="routerBack()" slot="left" v-show="showBack">
            <img src="../../img/back.png" style="width:.45rem;height:.45rem;">
        </div>
        <span slot="center" class="navTitle">{{title}}</span>
    </yd-navbar>
</template>

<script>
export default {
    data () {
        return {
        }
    },
    props: {
        showBack: Boolean,       //  是否显示返回的图标
        title: String            //  头部标题
    },
    methods: {
        routerBack () {
            this.$router.go(-1)
        }
    }
}
</script>
<style scoped>
.navTitle{color: white; font-size: .35rem;}
.yd-navbar:after {content: none;}
</style>
